{include file="public/header" /}
<div id="msgbox">
    <div id="title">
        <div class="info"><!-- <span class="iconfont"><if condition="$status eq 1">&#x24;<else/>&#x22;</if></span> --> 消息提示 [<span id="suplus_second">{$wait|default='0'}</span>]</div>
        <div style="float:right;width:20px;padding-right:30px;text-align:right;"><span  style="font-size:24px;color:#a0a0a0;" title="关闭" onclick="waitSecond = 1;
        jumpTimeout();">×</span></div>
    </div>
    <div class="msg_body">
        <div id="content">
            {if condition="$code eq 1"}
                <div class="true" style="color:#434343;">{$error}{$msg}</div>
            {else /}
                <div class="false" style="color:#434343;">{$error}{$msg}</div>
            {/if}
        </div>
        <div class="autoclose">如果没有自动跳转，请 <span style="color:#d32541; text-decoration: underline" title="关闭" onclick="waitSecond = 1; jumpTimeout();">点击这里</span></div>
    </div>
</div>
<script>
    var waitSecond = {$wait};
    var jsStr = '';
    var jsEndStr = '';
    var topUrl = false;
    var jumpUrl = "{$url}";
    var intervalId = 0;

    //解析URL。分享出JS和URL
    if (jumpUrl.indexOf("<js>") != -1) {
        jsStr = jumpUrl.substring(jumpUrl.indexOf("<js>") + 4, jumpUrl.indexOf("</js>"));
        jumpUrl = jumpUrl.replace("<js>" + jsStr + "</js>", '');
        eval(jsStr);
    }
    if (jumpUrl.indexOf("<jsend>") != -1) {
        jsEndStr = jumpUrl.substring(jumpUrl.indexOf("<jsend>") + 7, jumpUrl.indexOf("</jsend>"));
        jumpUrl = jumpUrl.replace("<jsend>" + jsEndStr + "</jsend>", '');
    }
    if (jumpUrl.indexOf("<topurl>") != -1) {
        topUrl = true;
        jumpUrl = jumpUrl.replace("<topurl>", '');
    }

    /**
     * 跳转动作
     */
    function jumpTimeout() {
        waitSecond--;
        $('#suplus_second').html(waitSecond);
        if (waitSecond <= 0) {
            clearInterval(intervalId);
            if (jsEndStr != '') {
                eval(jsEndStr);
            }
            if (jumpUrl != '') {
                if (topUrl) {
                    window.top.location.href = jumpUrl;
                } else {
                    window.location.href = jumpUrl;
                }
            }
        }
    }
    intervalId = setInterval(jumpTimeout, 1000);
</script>
{include file="public/footer" /}